//
//  HECircleMoreViewController.m
//  HealthFamily
//
//  Created by 吴欧 on 2021/3/1.
//  Copyright © 2021 honglutec. All rights reserved.
//

#import "HECircleMoreViewController.h"
#import "HERoomNoticeViewController.h"
#import "HERoomUserViewController.h"
#import "MJCSegmentInterface.h"

@interface HECircleMoreViewController ()

@end

@implementation HECircleMoreViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.title = @"聊天室";
    [self initUI];
}

- (void)initUI {
    
    NSArray *titles = @[@"成员",@"公告"];

    NSMutableArray *vcs = @[].mutableCopy;
    
    HERoomUserViewController *vi = [HERoomUserViewController new];
    HERoomNoticeViewController *hv = [HERoomNoticeViewController new];
    hv.roomId = _roomId;
    
    [vcs addObject:vi];
    [vcs addObject:hv];

    
    MJCSegmentStylesTools *tools = [MJCSegmentStylesTools jc_initWithSegmentStylestoolsBlock:^(MJCSegmentStylesTools *jc_tools) {
        jc_tools.
        jc_titleBarStyles(MJCTitlesScrollStyle).
        jc_titlesViewFrame(CGRectMake(0, ZXNavBarHeight, self.view.jc_width, 47)).
        jc_indicatorStyles(MJCIndicatorEqualTextEffect).
        jc_indicatorFrame(CGRectMake(0, 47-3, 0, 3)).
        jc_titlesViewBackColor([UIColor whiteColor]).
        jc_itemTextSelectedColor(UIColorBlack).
        jc_itemTextNormalColor([UIColor darkGrayColor]).
        jc_itemTextZoomEnabled(YES, 17).
        jc_itemTextFontSize(15).
        jc_defaultItemShowCount(5).
        jc_childsContainerBackColor([UIColor whiteColor]).
        jc_indicatorColor(CNavBgColor).
        jc_indicatorHidden(NO).
        jc_indicatorsAnimalsEnabled(YES).
        jc_childScollEnabled(YES).
        jc_childScollAnimalEnabled(YES).
        jc_indicatorFollowEnabled(YES).
        jc_itemTextsEdgeInsets(UIEdgeInsetsMake(10,10,10,10)).
        jc_itemTextGradientEnabled(YES).
        jc_itemSelectedSegmentIndex(self->_index);
    }];
    
    MJCSegmentInterface *interFace = [MJCSegmentInterface initWithFrame:CGRectMake(0, 0, KScreenWidth, KScreenHeight) interFaceStyletools:tools];
    [self.view addSubview:interFace];
    [interFace intoTitlesArray:titles intoChildControllerArray:vcs hostController:self];
    
    interFace.qmui_borderPosition = QMUIViewBorderPositionBottom;
    interFace.qmui_borderWidth = 1;
    interFace.qmui_borderColor = CSplitLineColor;
    
    [self zx_setPopGestureCompatibleScrollView: interFace.childMainView];

}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
